package chapter_twelve.p169;

/**
 * Data time:2021/10/19 17:18
 * StudentID:2019112118
 * Author:hgw
 * Description:构建装饰类，充当抽象装饰类
 */
public class ComponentDecorator extends Component{

    private Component component;    //  维持对抽象构建类型对象的引用

    //注入抽象构建类型的对象
    public ComponentDecorator(Component component) {
        this.component = component;
    }
    public void display() {
        component.display();
    }
}
